<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/core/watcher.js"></script>
    <script src="js/core/compile.js"></script>
    <script src="js/core/observer.js"></script>
    <script src="js/core/util.js"></script>
    <script src="js/core/ivy.js"></script>
    <script src="js/core/computed.js"></script>
</head>
<body>
    <div id="app">
        <div>
            <h2>{{title}}</h2>
            <input v-model="glgg.glggName">
            <input v-model="name">
            <h1>{{name}}</h1>
            <button v-on:click="clickMe">click me!</button>
            <p>{{glgg.glggName}}</p>
            <p>
                <span>
                    {{glgg.ttt.ggg}}
                </span>
            </p>
            <p>{{comglgg}}</p>
        </div>
    </div>
    <script type="text/javascript">
        const ivy = new Ivy({
            el: '#app',
            data: {
                title: 'hello world',
                name: 'canfoo',
                glgg:{
                    glggName:'glggName',
                    ttt:{
                        ggg:'ggg'
                    }
                }
            },
            computed:{
                comglgg(){
                    return this.glgg.glggName+'-'+this.name;
                }
            },
            methods: {
                clickMe: function () {
                    this.title = 'hello world';
                }
            },
            mounted: function () {
                window.setTimeout(() => {
                    this.title = '你好';
            }, 1000);
        }
    });
    </script>
</body>
</html>